/*
 * @Description: 
 * @Version: 2.0
 * @Autor: lxc
 * @Date: 2020-12-14 14:11:10
 * @LastEditors: lxc
 * @LastEditTime: 2020-12-14 17:49:35
 */
const mongoose = require("mongoose");
const Schema = mongoose.Schema;

// Creat Schema
const UserSchema = new Schema({
    name: {
        type: String,
        required: true
    },
    email: {
        type: String,
        required: true
    },
    password: {
        type: String,
        required: true
    },
    avatar: {
        type: String
    },
    date: {
        type: Date,
        default: Date.now
    },
})


module.exports = User = mongoose.model("users", UserSchema);